﻿using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Maticsoft.DBUtility;//Please add references
namespace EnterpriseFund.DAL
{
    /// <summary>
    /// 数据访问类:DSDJ_NSRXX_KZ
    /// </summary>
    public partial class DSDJ_NSRXX_KZ
    {
        public DSDJ_NSRXX_KZ()
        { }
        #region  BasicMethod


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public EnterpriseFund.Model.DSDJ_NSRXX_KZ DataRowToModel(DataRow row)
        {
            EnterpriseFund.Model.DSDJ_NSRXX_KZ model = new EnterpriseFund.Model.DSDJ_NSRXX_KZ();
            if (row != null)
            {
                if (row["NSRDZDAH"] != null && row["NSRDZDAH"].ToString() != "")
                {
                    model.NSRDZDAH = decimal.Parse(row["NSRDZDAH"].ToString());
                }
                if (row["NSRMC_YW"] != null)
                {
                    model.NSRMC_YW = row["NSRMC_YW"].ToString();
                }
                if (row["GSHBZ"] != null)
                {
                    model.GSHBZ = row["GSHBZ"].ToString();
                }
                if (row["FRBZ"] != null)
                {
                    model.FRBZ = row["FRBZ"].ToString();
                }
                if (row["ZCDZ"] != null)
                {
                    model.ZCDZ = row["ZCDZ"].ToString();
                }
                if (row["ZCD_YB"] != null)
                {
                    model.ZCD_YB = row["ZCD_YB"].ToString();
                }
                if (row["SCJYD_YB"] != null)
                {
                    model.SCJYD_YB = row["SCJYD_YB"].ToString();
                }
                if (row["DYDZ"] != null)
                {
                    model.DYDZ = row["DYDZ"].ToString();
                }
                if (row["GSKYRQ"] != null && row["GSKYRQ"].ToString() != "")
                {
                    model.GSKYRQ = DateTime.Parse(row["GSKYRQ"].ToString());
                }
                if (row["HSXS_DM"] != null)
                {
                    model.HSXS_DM = row["HSXS_DM"].ToString();
                }
                if (row["BSR_ZJLX_DM"] != null)
                {
                    model.BSR_ZJLX_DM = row["BSR_ZJLX_DM"].ToString();
                }
                if (row["BSR_ZJHM"] != null)
                {
                    model.BSR_ZJHM = row["BSR_ZJHM"].ToString();
                }
                if (row["JSJDJDM"] != null)
                {
                    model.JSJDJDM = row["JSJDJDM"].ToString();
                }
                if (row["GSDJJG_MC"] != null)
                {
                    model.GSDJJG_MC = row["GSDJJG_MC"].ToString();
                }
                if (row["ZZLB_DM"] != null)
                {
                    model.ZZLB_DM = row["ZZLB_DM"].ToString();
                }
                if (row["GSDJZZH"] != null)
                {
                    model.GSDJZZH = row["GSDJZZH"].ToString();
                }
                if (row["YXQ_Q"] != null && row["YXQ_Q"].ToString() != "")
                {
                    model.YXQ_Q = DateTime.Parse(row["YXQ_Q"].ToString());
                }
                if (row["YXQ_Z"] != null && row["YXQ_Z"].ToString() != "")
                {
                    model.YXQ_Z = DateTime.Parse(row["YXQ_Z"].ToString());
                }
                if (row["ZY"] != null)
                {
                    model.ZY = row["ZY"].ToString();
                }
                if (row["JY"] != null)
                {
                    model.JY = row["JY"].ToString();
                }
                if (row["JYFS"] != null)
                {
                    model.JYFS = row["JYFS"].ToString();
                }
                if (row["SCJYQX_Q"] != null && row["SCJYQX_Q"].ToString() != "")
                {
                    model.SCJYQX_Q = DateTime.Parse(row["SCJYQX_Q"].ToString());
                }
                if (row["SCJYQX_Z"] != null && row["SCJYQX_Z"].ToString() != "")
                {
                    model.SCJYQX_Z = DateTime.Parse(row["SCJYQX_Z"].ToString());
                }
                if (row["GSFZRQ"] != null && row["GSFZRQ"].ToString() != "")
                {
                    model.GSFZRQ = DateTime.Parse(row["GSFZRQ"].ToString());
                }
                if (row["ZCZB"] != null && row["ZCZB"].ToString() != "")
                {
                    model.ZCZB = decimal.Parse(row["ZCZB"].ToString());
                }
                if (row["ZCBZ_DM"] != null)
                {
                    model.ZCBZ_DM = row["ZCBZ_DM"].ToString();
                }
                if (row["TZZE"] != null && row["TZZE"].ToString() != "")
                {
                    model.TZZE = decimal.Parse(row["TZZE"].ToString());
                }
                if (row["TZBZ_DM"] != null)
                {
                    model.TZBZ_DM = row["TZBZ_DM"].ToString();
                }
                if (row["CYRS"] != null && row["CYRS"].ToString() != "")
                {
                    model.CYRS = long.Parse(row["CYRS"].ToString());
                }
                if (row["WJRS"] != null && row["WJRS"].ToString() != "")
                {
                    model.WJRS = long.Parse(row["WJRS"].ToString());
                }
                if (row["YZZZ"] != null)
                {
                    model.YZZZ = row["YZZZ"].ToString();
                }
                if (row["ZGDW"] != null)
                {
                    model.ZGDW = row["ZGDW"].ToString();
                }
                if (row["JYFWDW"] != null)
                {
                    model.JYFWDW = row["JYFWDW"].ToString();
                }
                if (row["ZJGYB"] != null)
                {
                    model.ZJGYB = row["ZJGYB"].ToString();
                }
                if (row["PZJG"] != null)
                {
                    model.PZJG = row["PZJG"].ToString();
                }
                if (row["PZWH"] != null)
                {
                    model.PZWH = row["PZWH"].ToString();
                }
                if (row["PZRQ"] != null && row["PZRQ"].ToString() != "")
                {
                    model.PZRQ = DateTime.Parse(row["PZRQ"].ToString());
                }
                if (row["ZHZCQK"] != null)
                {
                    model.ZHZCQK = row["ZHZCQK"].ToString();
                }
                if (row["CJQ_Q"] != null && row["CJQ_Q"].ToString() != "")
                {
                    model.CJQ_Q = DateTime.Parse(row["CJQ_Q"].ToString());
                }
                if (row["CJQ_Z"] != null && row["CJQ_Z"].ToString() != "")
                {
                    model.CJQ_Z = DateTime.Parse(row["CJQ_Z"].ToString());
                }
                if (row["HWCFC"] != null)
                {
                    model.HWCFC = row["HWCFC"].ToString();
                }
                if (row["HWCFDMJ"] != null)
                {
                    model.HWCFDMJ = row["HWCFDMJ"].ToString();
                }
                if (row["CWFZRMC"] != null)
                {
                    model.CWFZRMC = row["CWFZRMC"].ToString();
                }
                if (row["CWBBZL"] != null)
                {
                    model.CWBBZL = row["CWBBZL"].ToString();
                }
                if (row["GDZCZJFS"] != null)
                {
                    model.GDZCZJFS = row["GDZCZJFS"].ToString();
                }
                if (row["YHPTXFF"] != null)
                {
                    model.YHPTXFF = row["YHPTXFF"].ToString();
                }
                if (row["KJND"] != null)
                {
                    model.KJND = row["KJND"].ToString();
                }
                if (row["JZBWB_DM"] != null)
                {
                    model.JZBWB_DM = row["JZBWB_DM"].ToString();
                }
                if (row["JZLB"] != null)
                {
                    model.JZLB = row["JZLB"].ToString();
                }
                if (row["JZFS"] != null)
                {
                    model.JZFS = row["JZFS"].ToString();
                }
                if (row["JZRQ"] != null && row["JZRQ"].ToString() != "")
                {
                    model.JZRQ = int.Parse(row["JZRQ"].ToString());
                }
                if (row["FZRQ"] != null && row["FZRQ"].ToString() != "")
                {
                    model.FZRQ = DateTime.Parse(row["FZRQ"].ToString());
                }
                if (row["NSR_SWJG_DM"] != null)
                {
                    model.NSR_SWJG_DM = row["NSR_SWJG_DM"].ToString();
                }
                if (row["SWJG_DM"] != null)
                {
                    model.SWJG_DM = row["SWJG_DM"].ToString();
                }
                if (row["LRR_DM"] != null)
                {
                    model.LRR_DM = row["LRR_DM"].ToString();
                }
                if (row["LRRQ"] != null && row["LRRQ"].ToString() != "")
                {
                    model.LRRQ = DateTime.Parse(row["LRRQ"].ToString());
                }
                if (row["XGR_DM"] != null)
                {
                    model.XGR_DM = row["XGR_DM"].ToString();
                }
                if (row["XGRQ"] != null && row["XGRQ"].ToString() != "")
                {
                    model.XGRQ = DateTime.Parse(row["XGRQ"].ToString());
                }
                if (row["FRGJ_DM"] != null)
                {
                    model.FRGJ_DM = row["FRGJ_DM"].ToString();
                }
                if (row["TZFS_DM"] != null)
                {
                    model.TZFS_DM = row["TZFS_DM"].ToString();
                }
                if (row["JYMS_DM"] != null)
                {
                    model.JYMS_DM = row["JYMS_DM"].ToString();
                }
                if (row["HJLX_DM"] != null)
                {
                    model.HJLX_DM = row["HJLX_DM"].ToString();
                }
                if (row["SBDJZH"] != null)
                {
                    model.SBDJZH = row["SBDJZH"].ToString();
                }
                if (row["HYML_DM"] != null)
                {
                    model.HYML_DM = row["HYML_DM"].ToString();
                }
                if (row["ZJFL_DM"] != null)
                {
                    model.ZJFL_DM = row["ZJFL_DM"].ToString();
                }
                if (row["DSBZ"] != null)
                {
                    model.DSBZ = row["DSBZ"].ToString();
                }
                if (row["NSFS_DM"] != null)
                {
                    model.NSFS_DM = row["NSFS_DM"].ToString();
                }
                if (row["FRXB_DM"] != null)
                {
                    model.FRXB_DM = row["FRXB_DM"].ToString();
                }
                if (row["FRZW"] != null)
                {
                    model.FRZW = row["FRZW"].ToString();
                }
                if (row["FRNL"] != null && row["FRNL"].ToString() != "")
                {
                    model.FRNL = int.Parse(row["FRNL"].ToString());
                }
                if (row["FRDH"] != null)
                {
                    model.FRDH = row["FRDH"].ToString();
                }
                if (row["CWFZRXB_DM"] != null)
                {
                    model.CWFZRXB_DM = row["CWFZRXB_DM"].ToString();
                }
                if (row["CWFZRZW"] != null)
                {
                    model.CWFZRZW = row["CWFZRZW"].ToString();
                }
                if (row["CWFZRNL"] != null && row["CWFZRNL"].ToString() != "")
                {
                    model.CWFZRNL = int.Parse(row["CWFZRNL"].ToString());
                }
                if (row["CWFZRDH"] != null)
                {
                    model.CWFZRDH = row["CWFZRDH"].ToString();
                }
                if (row["CWFZRSFHM"] != null)
                {
                    model.CWFZRSFHM = row["CWFZRSFHM"].ToString();
                }
                if (row["BSRYXB_DM"] != null)
                {
                    model.BSRYXB_DM = row["BSRYXB_DM"].ToString();
                }
                if (row["BSRYZW"] != null)
                {
                    model.BSRYZW = row["BSRYZW"].ToString();
                }
                if (row["BSRYNL"] != null && row["BSRYNL"].ToString() != "")
                {
                    model.BSRYNL = int.Parse(row["BSRYNL"].ToString());
                }
                if (row["BSRYDH"] != null)
                {
                    model.BSRYDH = row["BSRYDH"].ToString();
                }
                if (row["DWXZ"] != null)
                {
                    model.DWXZ = row["DWXZ"].ToString();
                }
                if (row["WANGZHI"] != null)
                {
                    model.WANGZHI = row["WANGZHI"].ToString();
                }
                if (row["FRGJ_DZ"] != null)
                {
                    model.FRGJ_DZ = row["FRGJ_DZ"].ToString();
                }
                if (row["ZCD_DHHM"] != null)
                {
                    model.ZCD_DHHM = row["ZCD_DHHM"].ToString();
                }
                if (row["SCD_DHHM"] != null)
                {
                    model.SCD_DHHM = row["SCD_DHHM"].ToString();
                }
                if (row["HHR_ZS"] != null && row["HHR_ZS"].ToString() != "")
                {
                    model.HHR_ZS = long.Parse(row["HHR_ZS"].ToString());
                }
                if (row["FR_YDDHHM"] != null)
                {
                    model.FR_YDDHHM = row["FR_YDDHHM"].ToString();
                }
                if (row["BSR_YDDHHM"] != null)
                {
                    model.BSR_YDDHHM = row["BSR_YDDHHM"].ToString();
                }
                if (row["BSR_DYDZ"] != null)
                {
                    model.BSR_DYDZ = row["BSR_DYDZ"].ToString();
                }
                if (row["CW_YDDHHM"] != null)
                {
                    model.CW_YDDHHM = row["CW_YDDHHM"].ToString();
                }
                if (row["CW_ZJLX_DM"] != null)
                {
                    model.CW_ZJLX_DM = row["CW_ZJLX_DM"].ToString();
                }
                if (row["CW_DYDZ"] != null)
                {
                    model.CW_DYDZ = row["CW_DYDZ"].ToString();
                }
                if (row["SWDLR_MC"] != null)
                {
                    model.SWDLR_MC = row["SWDLR_MC"].ToString();
                }
                if (row["SWDLR_SBH"] != null)
                {
                    model.SWDLR_SBH = row["SWDLR_SBH"].ToString();
                }
                if (row["SWDLR_DHHM"] != null)
                {
                    model.SWDLR_DHHM = row["SWDLR_DHHM"].ToString();
                }
                if (row["SWDLR_DYDZ"] != null)
                {
                    model.SWDLR_DYDZ = row["SWDLR_DYDZ"].ToString();
                }
                if (row["ZRRTZBL"] != null && row["ZRRTZBL"].ToString() != "")
                {
                    model.ZRRTZBL = decimal.Parse(row["ZRRTZBL"].ToString());
                }
                if (row["WZTZBL"] != null && row["WZTZBL"].ToString() != "")
                {
                    model.WZTZBL = decimal.Parse(row["WZTZBL"].ToString());
                }
                if (row["GYTZBL"] != null && row["GYTZBL"].ToString() != "")
                {
                    model.GYTZBL = decimal.Parse(row["GYTZBL"].ToString());
                }
                if (row["HYDLB_DM"] != null)
                {
                    model.HYDLB_DM = row["HYDLB_DM"].ToString();
                }
                if (row["HYDLC_DM"] != null)
                {
                    model.HYDLC_DM = row["HYDLC_DM"].ToString();
                }
                if (row["HYDLD_DM"] != null)
                {
                    model.HYDLD_DM = row["HYDLD_DM"].ToString();
                }
                if (row["HYB_DM"] != null)
                {
                    model.HYB_DM = row["HYB_DM"].ToString();
                }
                if (row["HYC_DM"] != null)
                {
                    model.HYC_DM = row["HYC_DM"].ToString();
                }
                if (row["HYD_DM"] != null)
                {
                    model.HYD_DM = row["HYD_DM"].ToString();
                }
                if (row["LSNSRLX_DM"] != null)
                {
                    model.LSNSRLX_DM = row["LSNSRLX_DM"].ToString();
                }
                if (row["LSNSR_YXQ"] != null)
                {
                    model.LSNSR_YXQ = row["LSNSR_YXQ"].ToString();
                }
                if (row["ZCZB_ZE"] != null && row["ZCZB_ZE"].ToString() != "")
                {
                    model.ZCZB_ZE = decimal.Parse(row["ZCZB_ZE"].ToString());
                }
                if (row["ZCZBB"] != null && row["ZCZBB"].ToString() != "")
                {
                    model.ZCZBB = decimal.Parse(row["ZCZBB"].ToString());
                }
                if (row["ZCBZB_DM"] != null)
                {
                    model.ZCBZB_DM = row["ZCBZB_DM"].ToString();
                }
                if (row["ZCZBC"] != null && row["ZCZBC"].ToString() != "")
                {
                    model.ZCZBC = decimal.Parse(row["ZCZBC"].ToString());
                }
                if (row["ZCBZC_DM"] != null)
                {
                    model.ZCBZC_DM = row["ZCBZC_DM"].ToString();
                }
                if (row["KHDJZH"] != null)
                {
                    model.KHDJZH = row["KHDJZH"].ToString();
                }
                if (row["DJZFZRQ"] != null && row["DJZFZRQ"].ToString() != "")
                {
                    model.DJZFZRQ = DateTime.Parse(row["DJZFZRQ"].ToString());
                }
                if (row["WCBYY_DM"] != null)
                {
                    model.WCBYY_DM = row["WCBYY_DM"].ToString();
                }
                if (row["QYTSBZ_DM"] != null)
                {
                    model.QYTSBZ_DM = row["QYTSBZ_DM"].ToString();
                }
                if (row["DLFQ_DM"] != null)
                {
                    model.DLFQ_DM = row["DLFQ_DM"].ToString();
                }
                if (row["DAH"] != null)
                {
                    model.DAH = row["DAH"].ToString();
                }
                if (row["PQ_DM"] != null && row["PQ_DM"].ToString() != "")
                {
                    model.PQ_DM = decimal.Parse(row["PQ_DM"].ToString());
                }
                if (row["NSRTSZTLX_DM"] != null)
                {
                    model.NSRTSZTLX_DM = row["NSRTSZTLX_DM"].ToString();
                }
                if (row["ZFXYH"] != null)
                {
                    model.ZFXYH = row["ZFXYH"].ToString();
                }
                if (row["QXSDSGXJG"] != null)
                {
                    model.QXSDSGXJG = row["QXSDSGXJG"].ToString();
                }
                if (row["BY_NSRSBH"] != null)
                {
                    model.BY_NSRSBH = row["BY_NSRSBH"].ToString();
                }
            }
            return model;
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select NSRDZDAH,NSRMC_YW,GSHBZ,FRBZ,ZCDZ,ZCD_YB,SCJYD_YB,DYDZ,GSKYRQ,HSXS_DM,BSR_ZJLX_DM,BSR_ZJHM,JSJDJDM,GSDJJG_MC,ZZLB_DM,GSDJZZH,YXQ_Q,YXQ_Z,ZY,JY,JYFS,SCJYQX_Q,SCJYQX_Z,GSFZRQ,ZCZB,ZCBZ_DM,TZZE,TZBZ_DM,CYRS,WJRS,YZZZ,ZGDW,JYFWDW,ZJGYB,PZJG,PZWH,PZRQ,ZHZCQK,CJQ_Q,CJQ_Z,HWCFC,HWCFDMJ,CWFZRMC,CWBBZL,GDZCZJFS,YHPTXFF,KJND,JZBWB_DM,JZLB,JZFS,JZRQ,FZRQ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,FRGJ_DM,TZFS_DM,JYMS_DM,HJLX_DM,SBDJZH,HYML_DM,ZJFL_DM,DSBZ,NSFS_DM,FRXB_DM,FRZW,FRNL,FRDH,CWFZRXB_DM,CWFZRZW,CWFZRNL,CWFZRDH,CWFZRSFHM,BSRYXB_DM,BSRYZW,BSRYNL,BSRYDH,DWXZ,WANGZHI,FRGJ_DZ,ZCD_DHHM,SCD_DHHM,HHR_ZS,FR_YDDHHM,BSR_YDDHHM,BSR_DYDZ,CW_YDDHHM,CW_ZJLX_DM,CW_DYDZ,SWDLR_MC,SWDLR_SBH,SWDLR_DHHM,SWDLR_DYDZ,ZRRTZBL,WZTZBL,GYTZBL,HYDLB_DM,HYDLC_DM,HYDLD_DM,HYB_DM,HYC_DM,HYD_DM,LSNSRLX_DM,LSNSR_YXQ,ZCZB_ZE,ZCZBB,ZCBZB_DM,ZCZBC,ZCBZC_DM,KHDJZH,DJZFZRQ,WCBYY_DM,QYTSBZ_DM,DLFQ_DM,DAH,PQ_DM,NSRTSZTLX_DM,ZFXYH,QXSDSGXJG,BY_NSRSBH ");
            strSql.Append(" FROM DJ_NSRXX_KZ ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return DbHelperOra.Query(strSql.ToString());
        }

        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" NSRDZDAH,NSRMC_YW,GSHBZ,FRBZ,ZCDZ,ZCD_YB,SCJYD_YB,DYDZ,GSKYRQ,HSXS_DM,BSR_ZJLX_DM,BSR_ZJHM,JSJDJDM,GSDJJG_MC,ZZLB_DM,GSDJZZH,YXQ_Q,YXQ_Z,ZY,JY,JYFS,SCJYQX_Q,SCJYQX_Z,GSFZRQ,ZCZB,ZCBZ_DM,TZZE,TZBZ_DM,CYRS,WJRS,YZZZ,ZGDW,JYFWDW,ZJGYB,PZJG,PZWH,PZRQ,ZHZCQK,CJQ_Q,CJQ_Z,HWCFC,HWCFDMJ,CWFZRMC,CWBBZL,GDZCZJFS,YHPTXFF,KJND,JZBWB_DM,JZLB,JZFS,JZRQ,FZRQ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,FRGJ_DM,TZFS_DM,JYMS_DM,HJLX_DM,SBDJZH,HYML_DM,ZJFL_DM,DSBZ,NSFS_DM,FRXB_DM,FRZW,FRNL,FRDH,CWFZRXB_DM,CWFZRZW,CWFZRNL,CWFZRDH,CWFZRSFHM,BSRYXB_DM,BSRYZW,BSRYNL,BSRYDH,DWXZ,WANGZHI,FRGJ_DZ,ZCD_DHHM,SCD_DHHM,HHR_ZS,FR_YDDHHM,BSR_YDDHHM,BSR_DYDZ,CW_YDDHHM,CW_ZJLX_DM,CW_DYDZ,SWDLR_MC,SWDLR_SBH,SWDLR_DHHM,SWDLR_DYDZ,ZRRTZBL,WZTZBL,GYTZBL,HYDLB_DM,HYDLC_DM,HYDLD_DM,HYB_DM,HYC_DM,HYD_DM,LSNSRLX_DM,LSNSR_YXQ,ZCZB_ZE,ZCZBB,ZCBZB_DM,ZCZBC,ZCBZC_DM,KHDJZH,DJZFZRQ,WCBYY_DM,QYTSBZ_DM,DLFQ_DM,DAH,PQ_DM,NSRTSZTLX_DM,ZFXYH,QXSDSGXJG,BY_NSRSBH ");
            strSql.Append(" FROM DJ_NSRXX_KZ ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return DbHelperOra.Query(strSql.ToString());
        }

        #endregion  BasicMethod
        #region  ExtensionMethod

        #endregion  ExtensionMethod
    }
}

